-- GENERATED SPELL FOR [Muck Spawn] --


function spell0_17154(pUnit, Event) --@Mucky Sludge,n/a--
pUnit:FullCastSpellOnTarget(32013,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17154', 12000, 1)
end

function spell1_17154(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(21067,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17154', 12500, 1)
end

function Sorts_17154(pUnit, Event)
local choix_sorts_17154 = math.random(0, 1)
if choix_sorts_17154 == 0 then
pUnit:RegisterEvent('spell0_17154', 1, 1)
end
if choix_sorts_17154 == 1 then
pUnit:RegisterEvent('spell1_17154', 1, 1)
end
end

function mob17154_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17154', math.random(1500, 3000), 1)
end

function mob17154_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17154_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17154_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17154, 1, 'mob17154_Action')
RegisterUnitEvent(17154, 2, 'mob17154_Leave')
RegisterUnitEvent(17154, 3, 'mob17154_Kill')
RegisterUnitEvent(17154, 4, 'mob17154_Die')
